#include<iostream>
using namespace std;

int main(){
	int num,n,sum=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%d",&num);
		if(num%2==0){
			sum+=num;
		}
	}
	printf("%d\n",sum);
	return 0;
} 
